package chapter3.No3_1_等待和通知机制.j生产者_消费者模式实现.demo2;

/**
 * Created by Administrator on 2016/11/19.
 */
public class ThreadP extends Thread {
    P p;

    public ThreadP(P p) {
        this.p = p;
    }

    @Override
    public void run() {
        while(true) {
//            try {
//                Thread.sleep(500);
                p.setValue();
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
        }
    }
}
